#### Code for reproducing Figure 1 ###

# Load packages (Install first if not installed)
library(readxl)
library(ggplot2)
library(patchwork)

diversitydata <- read_excel("diversitydata.xlsx") # Change file pathway 

p1 <- ggplot(data=diversitydata, aes(x=year, y=hisp, group=Field)) +
  geom_line(aes(linetype=Field, color=Field))+
  ylab("Percent Hispanic/Latinx")+
  xlab("Year")

p2 <- ggplot(data=diversitydata, aes(x=year, y=black, group=Field)) +
  geom_line(aes(linetype=Field, color=Field))+
  ylab("Percent Black")+
  xlab("Year")

p3 <- ggplot(data=diversitydata, aes(x=year, y=women, group=Field)) +
  geom_line(aes(linetype=Field, color=Field))+
  ylab("Percent Women")+
  xlab("Year")

combined <- p1 + p2 + p3 & theme(legend.position = "bottom")
combined + plot_layout(guides = "collect") 
